Skip to content

feat: Enhance node-mongoose course API with modular architecture and new features"#75

Open
ayushh8 wants to merge 2 commits intokeploy:mainfrom
ayushh8:ayush-improvements
Open

feat: Enhance node-mongoose course API with modular architecture and new features"#75
ayushh8 wants to merge 2 commits intokeploy:mainfrom
ayushh8:ayush-improvements

Conversation

@ayushh8
Copy link

@ayushh8 ayushh8 commented Jun 18, 2025

🚀 Enhanced Node.js Course Management API

All Features Tested and Working:

  • GET /courses - Returns courses with pagination ✅
  • POST /courses - Creates courses with validation ✅
  • GET /courses?search=query - Search functionality ✅
  • PUT /courses/:id - Updates courses ✅
  • DELETE /courses/:id - Deletes courses ✅

Improvements Made:

  • Code Structure: Reorganized from monolithic app.js to modular architecture
  • New Features: Added pagination, search functionality, and input validation
  • Enhanced API: Better error handling and new endpoints
  • Documentation: Updated README with comprehensive contribution details

Technical Improvements:

  • Modular folder structure (models, routes, controllers, middleware, config)
  • Enhanced Mongoose schema with validation
  • Comprehensive error handling
  • Input validation middleware
  • Search functionality integrated into main endpoint

New API Endpoints:

  • GET /courses?page=1&limit=10 - Paginated course listing
  • GET /courses?search=query - Search courses by title or description

This makes the API more robust, maintainable, and production-ready while maintaining backward compatibility.

Copy link

@pratik-mahalle pratik-mahalle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @ayushh8, Thank you for raising the pr. Our team will review it soon

Copy link
Member

@Achanandhi-M Achanandhi-M left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @ayushh8
Could you please add a README explaining how to run this sample app?
Also, include the test cases generated using Keploy in the sample app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants